package com.financing.wap.service.impl;


import java.sql.SQLException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpFaUserSaysayDTO;
import com.financing.wap.service.IFpFaUserSaysayService;
import com.financing.wap.dao.IFpFaUserSaysayDao;
/**
 * fp_fa_user_saysay  
 * FA人员说说 业务访问层实现类
 * @author lisu
 *
 */
 
@Repository("fpFaUserSaysayService")
public class FpFaUserSaysayServiceImpl implements IFpFaUserSaysayService{

	@Autowired
	private IFpFaUserSaysayDao fpFaUserSaysayDao;

	@Override
	public int insert(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return fpFaUserSaysayDao.insert(fpFaUserSaysay);
	}

	@Override
	public void update(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		fpFaUserSaysayDao.update(fpFaUserSaysay);
	}

	@Override
	public void updateForce(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		fpFaUserSaysayDao.updateForce(fpFaUserSaysay);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		fpFaUserSaysayDao.delete(id);
	}
	
	@Override
	public List<FpFaUserSaysayDTO> queryList(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return fpFaUserSaysayDao.queryList(fpFaUserSaysay);
	}

	@Override
	public int queryListCount(FpFaUserSaysayDTO fpFaUserSaysay) throws SQLException {
		return fpFaUserSaysayDao.queryListCount(fpFaUserSaysay);
	}

	@Override
	public FpFaUserSaysayDTO loadById(Integer id) throws SQLException {
		return fpFaUserSaysayDao.loadById(id);
	}
 	@Override
	public FpFaUserSaysayDTO queryListGetFirst(FpFaUserSaysayDTO fpFaUserSaysay)
			throws SQLException {
		 List<FpFaUserSaysayDTO> queryList = queryList(fpFaUserSaysay);
		 if(queryList==null||queryList.size()==0){
			 return new FpFaUserSaysayDTO();
		 }
		 return queryList.get(0);
	}
}
